package com.cms.article.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.cms.common.annotation.Excel;
import com.cms.common.core.domain.BaseEntity;

/**
 * 文章对象 cms_article
 * 
 * @author rjxy
 * @date 2025-09-29
 */
public class CmsArticle extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 文章ID */
    private Long id;

    /** 文章标题 */
    @Excel(name = "文章标题")
    private String title;

    /** 文章摘要 */
    @Excel(name = "文章摘要")
    private String summary;

    /** 文章正文（HTML） */
    @Excel(name = "文章正文", readConverterExp = "H=TML")
    private String content;

    /** 文章状态：draft=草稿，published=已发布，recycled=回收站 */
    @Excel(name = "文章状态：draft=草稿，published=已发布，recycled=回收站")
    private String status;

    /** 作者ID（关联sys_user.id） */
    @Excel(name = "作者ID", readConverterExp = "关=联sys_user.id")
    private Long authorId;

    /** 发布时间（仅已发布状态有值） */
    @Excel(name = "发布时间", readConverterExp = "仅=已发布状态有值")
    private Date publishTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setSummary(String summary) 
    {
        this.summary = summary;
    }

    public String getSummary() 
    {
        return summary;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setAuthorId(Long authorId) 
    {
        this.authorId = authorId;
    }

    public Long getAuthorId() 
    {
        return authorId;
    }
    public void setPublishTime(Date publishTime) 
    {
        this.publishTime = publishTime;
    }

    public Date getPublishTime() 
    {
        return publishTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("summary", getSummary())
            .append("content", getContent())
            .append("status", getStatus())
            .append("authorId", getAuthorId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("publishTime", getPublishTime())
            .toString();
    }
}
